<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
    
    <ui:composition template="/WEB-INF/templates/common/admin.xhtml">
        <ui:define name="title">Cargo Registration</ui:define>        
        <h:head>
            <style>
                <!-- work around to fix selectonemenu bug in Chrome & Safari -->
                .ui-selectonemenu-label{
                    width:90% !important;
                }
            </style>
        </h:head>
        
        
        <ui:define name="content">

            <div class="ui-grid ui-grid-responsive">
                <div class="ui-grid-row">
                    <div class="ui-grid-col-3" id="leftCol"></div>
                    <div class="ui-grid-col-6" id="mainCol">

                        <br/>
                        <h:form>
                            <p:outputLabel value="2. Set the destination for this new cargo coming from #{bookingBackingBean.originName}" />
                            <hr/>
                            <p:selectOneMenu id="destination" value="#{bookingBackingBean.destinationUnlocode}">
                                <f:selectItems value="#{bookingBackingBean.locations}" var="location"
                                               itemLabel="#{location.name} " itemValue="#{location.unLocode}" />
                            </p:selectOneMenu>
                            <hr/>   

                            <h:panelGrid columns="5" styleClass="registrationPanelGrid" style="margin: 0 auto;">
                                <p:commandButton value="Back" action="booking" />
                                <p:commandButton value="Cancel" action="/admin/dashboard" />
                                <p:commandButton value="Next" action="booking-date" />

                            </h:panelGrid>

                        </h:form>
                    </div>

                    <div class="ui-grid-col-3" id="leftCol"></div>
                </div>
            </div>
    
    
        </ui:define>
        
        
    </ui:composition>
        
        
</html>
